package com.imedia.frame.lucene.model;

import java.io.Serializable;
/**
 * <p>Title: 全站检索</p>
 * <p>Description: 索引模型</p>
 * <p>Copyright: Copyright (c) 2009</p>
 * <p>Company: </p>
 * @author qiuy
 * @version 1.0
 */
@SuppressWarnings("serial")
public class IndexModel implements Serializable{
	private String id;			// 模型的id 对应各自表的id 更新索引时候需要用到
	private String title;		// 模型的标题 搜索结果要显示的标题 不同结果同一页面显示的标识
	private String author;		// 作者 有作者的模块就写没有的就不写
	private String content;		// 描述
	private int type;  			// 模型的类型 1：新闻（news模块） 2：信息（information模块）
	private String url; 		// 结果的链接地址
	public IndexModel() {
		
	}

	public IndexModel(String id, String title, String author, String content,
			int type, String url) {
		super();
		this.id = id;
		this.title = title;
		this.author = author;
		this.content = content;
		this.type = type;
		this.url = url;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		final String NEXT_LINE = "\n";
		sb.append("id：").append(id).append(NEXT_LINE).append("标题：").append(title).append(NEXT_LINE).append("作者：").append(author).append(NEXT_LINE)
		.append("栏目：").append(type).append(NEXT_LINE).append("url：").append(url).append(NEXT_LINE);
		return sb.toString();
	}
	
	
}
